package action;

import org.jboss.seam.annotations.Conversational;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;

import entity.Nomikaimember;

@Conversational
@Name("nomikaiConfirmAction")
public class NomikaiConfirmAction {
	@Logger
	private Log log;

	@In
	private Nomikaimember nomikaimember;

	public void page() {
		log.info("find nomikai member is #0",
				nomikaimember.getNomikaimemberid());
	}

	public String reset() {
		return "reset";
	}

	public String invoke() {
		//int attend = nomikaimember.getAttend();
				boolean attend = nomikaimember.getAttend();
				//nomikaimember.setAttend(attend == 0 ? 1 : 0);
			nomikaimember.setAttend(!attend);
		return "invoke";
	}
}
